package events;


import greenhouse.control.*;

public class Events {
	private String name;
	
	public Events(String name){
		this.name=name;
	}
	
	public String getName(){
		return name;
	}
	
	public void run(String events[]){
		ControllerRequest request = new ControllerRequest(events);
		Controller cont = ControllerBroker.getInstance().collectInfo(request);
		for(int i=0; i<events.length; i++){
			System.out.println("Event:"+name+"-- Id Sensor: "+events[i]+"--Kind of Sensor: "+cont.getQuote(events[i]));
			
		}
	}
	
	public static void main(String[] args){
		Events water = new Events("Water");
		Events light = new Events("Light");
		Events temperature = new Events("Temperature");
		
		water.run(new String[]{"0001","0002"});
		light.run(new String[]{"0003"});
		water.run(new String[]{"0004"});
		temperature.run(new String[]{"0005"});

	}

}
